home *** CD-ROM | disk | FTP | other *** search
- procedure bload(filename:string);
-
- {$m 40000,0,655360}
- {You might need to change the heapmax for your system}
-
- {BEAHM 8/11/88}
-
- {THIS PROCEDURE WILL LET YOU BLOAD A BASIC CGA GRAPHIC WITH YOUR TURBO
- PASCAL 4.0. YOU WILL HAVE TO INITIALIZE THE GRAPHICS AND SET THE GRAPH
- MODE IN YOUR MAIN PROGRAM BEFORE YOU CALL BLOAD}
-
- type
- bspic=array[0..16200] of byte;
-
- var
- ifyle:file of bspic;
- a,
- b:bspic;
- x,
- y,
- z:integer;
-
-
- begin
- assign(ifyle,filename);
- reset(ifyle);
- read(ifyle,a);
- close(ifyle);
-
- {you need to have initialized the graphics in the main program
- before you call BLOAD}
-
- getimage(0,0,getmaxx,getmaxy,b);
-
- z:=6;
-
- for x:=0 to 99 do
- for y:=0 to 79 do
- begin
- z:=z+1;
- b[x*160+y+4]:=a[z];
- end;
-
- z:=z+192; {NECESSARY TO SKIP TO SECOND HALF OF BSAVED GRAPHIC}
-
- for x:=0 to 99 do
- for y:=0 to 79 do
- begin
- z:=z+1;
- b[x*160+y+84]:=a[z];
- end;
-
- putimage(0,0,b,normalput);
-
- end;
-